package liuyuyang.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName("sys_user_role")
public class UserRole {
    @TableId(value = "user_id")
    private Integer userId;
    @TableField("role_id")
    private Integer roleId;
}

/*
# 中间表：用户角色表
CREATE TABLE `sys_user_role`  (
  `user_id` VARCHAR(32),
  `role_id` INT(10) ,
  INDEX `FK_Reference_1`(`user_id`) USING BTREE,
  INDEX `FK_Reference_2`(`role_id`) USING BTREE,
  CONSTRAINT `sys_user_role_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`),
  CONSTRAINT `sys_user_role_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `tb_user` (`u_id`)
);
 */